import 'package:flutter/material.dart';

/// 间隔
class Gaps {
  /// 水平间隔
  static Widget hGap(double width) => SizedBox(width: width);

  /// 垂直间隔
  static Widget vGap(double height) => SizedBox(height: height);

  static const Widget empty = SizedBox();

  static Widget vLine({double height = 32.0, double width = 0.5, Color color = Colors.grey, EdgeInsetsGeometry? margin}) => Container(
        width: width,
        height: height,
        color: color,
        margin: margin,
      );

  static Widget hLine({double height = 0.5, double width = double.infinity, Color? color, EdgeInsetsGeometry? margin}) => Container(
        width: width,
        height: height,
        color: color ?? Colors.black.withOpacity(0.05),
        margin: margin,
      );

  static Widget hbLine({double height = 10, double width = double.infinity, Color? color, EdgeInsetsGeometry? margin}) => hLine(
        width: width,
        height: height,
        color: color ?? Colors.grey.withOpacity(0.05),
        margin: margin,
      );
}
